package com.metadata_system.common.db.entity;

import java.util.Date;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Table(name = "md_metadata_view")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class MetadataView {
    @Id
    private Integer id;

    /**
     * 元数据ID
     */
    @Column(name = "metadata_id")
    private Integer metadataId;

    /**
     * 视图名称
     */
    private String name;

    /**
     * 视图简称
     */
    @Column(name = "short_name")
    private String shortName;

    /**
     * 节点-数量
     */
    @Column(name = "node_total")
    private Integer nodeTotal;

    /**
     * 关系-数量
     */
    @Column(name = "edge_total")
    private Integer edgeTotal;

    /**
     * 配置信息: 视图缩放,坐标(x,y)
     */
    private String config;

    /**
     * 更新时间
     */
    @Column(name = "updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updatedTime;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createdTime;
}